<template>
  <div>
    <h1>鱼塘,{{testData}}</h1>
  </div>
</template>
<script> 
export default {
  data() {
    return {
      testData: ""
    }
  },
  created() {
    console.log("----------")
    // this.$api.queryPaperbycurr().then(res => {
    //   console.log(res)
    // })
  },
  mounted() {
    setTimeout(() => {
      this.$bus.$on("testData", (res) => {
        console.log("接受到了吗？")
        console.log(res)
        this.testData = res
        console.log("this.testData=" + this.testData)
      })
    }, 0);
  },
//   beforeDestroy(){
//       this.$bus.$off("testData")
//   }
}
</script>